package cm.tl.pms.entity;

import cm.tl.pms.common.annotation.Excel;
import cm.tl.pms.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 项目审核明细日志对象 biz_approval_log
 *
 * @author ruoyi
 * @date 2025-04-09
 */
@TableName("biz_approval_log")
public class ApprovalLog extends BaseEntity {

    /**
     * 审核记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 外键id
     */
    @Excel(name = "外键id")
    private Long refId;

    /**
     * 审核类型
     */
    @Excel(name = "审核类型")
    private Long bizType;

    /**
     * 申请原因
     */
    @Excel(name = "申请原因")
    private String applyMsg;

    /**
     * 审核人ID
     */
    @Excel(name = "审核人ID")
    private Long approverId;

    /**
     * 审核人姓名
     */
    @Excel(name = "审核人姓名")
    private String approver;

    /**
     * 审核结果
     */
    @Excel(name = "审核结果")
    private Long approvalResult;

    /**
     * 审核意见
     */
    @Excel(name = "审核意见")
    private String approvalComment;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /**
     * 单位id
     */
    @Excel(name = "单位id")
    private Long deptId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setRefId(Long refId) {
        this.refId = refId;
    }

    public Long getRefId() {
        return refId;
    }

    public void setBizType(Long bizType) {
        this.bizType = bizType;
    }

    public Long getBizType() {
        return bizType;
    }

    public void setApplyMsg(String applyMsg) {
        this.applyMsg = applyMsg;
    }

    public String getApplyMsg() {
        return applyMsg;
    }

    public void setApproverId(Long approverId) {
        this.approverId = approverId;
    }

    public Long getApproverId() {
        return approverId;
    }

    public void setApprover(String approver) {
        this.approver = approver;
    }

    public String getApprover() {
        return approver;
    }

    public void setApprovalResult(Long approvalResult) {
        this.approvalResult = approvalResult;
    }

    public Long getApprovalResult() {
        return approvalResult;
    }

    public void setApprovalComment(String approvalComment) {
        this.approvalComment = approvalComment;
    }

    public String getApprovalComment() {
        return approvalComment;
    }

    public void setApprovalTime(Date approvalTime) {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime() {
        return approvalTime;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("refId", getRefId())
                .append("bizType", getBizType())
                .append("applyMsg", getApplyMsg())
                .append("approverId", getApproverId())
                .append("approver", getApprover())
                .append("approvalResult", getApprovalResult())
                .append("approvalComment", getApprovalComment())
                .append("approvalTime", getApprovalTime())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("deptId", getDeptId())
                .toString();
    }
}
